#ifndef MUTEX_H_
#define MUTEX_H_

/*Encapsulado de Mutex*/
class Mutex {
private:
	pthread_mutex_t n;
public:
	Mutex(){pthread_mutex_init(&n, NULL);};
	virtual ~Mutex(){pthread_mutex_destroy(&n);};
	int lock(){return pthread_mutex_lock(&n);};
	int unlock(){return pthread_mutex_unlock(&n);};
};

#endif /* MUTEX_H_ */
